<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\widgets\LinkPager;

$this->title = '我的消息';
$this->params['breadcrumbs'][] = $this->title;
?>
<style>
    .pagination .active a {
    background: #ea580b;
    color: #fff;
}
</style>
<div class="Weizhi">
    <span>当前位置 : </span><a href="#">首页 > </a><a href="#">会员中心 > </a><a href="#">我的消息</a>
</div>
<div id="Contet">
        <?= $this->render('left.php'); ?>
         <div id="Zhong" style=" width:980px;">
                  <ul class="ul_all">
                    <?php foreach ($list as $key => $val) { 
                    if(($key+1)%4==0 && ($key+1)!=$count)
                    { ?>
                     <li><a href="<?= yii\helpers\Url::to(['member/messagepage','id'=>$val->id]);?>"><font>▶</font><span class="span1"><?= mb_substr(strip_tags($val->title),0,50,'utf-8'); ?><?php if(strlen( $val->title) > 115) { echo '...'; } ?></span><span style="float:right;"><?= date('Y-m-d',$val->updated_at);?></span></a></li>
                     </ul>
                     <ul class="ul_all">
                    <?php  }else{ ?>
                    <li><a href="<?= yii\helpers\Url::to(['member/messagepage','id'=>$val->id]);?>"><font>▶</font><span class="span1"><?= mb_substr(strip_tags( $val->title),0,50,'utf-8'); ?><?php if(strlen( $val->title) > 115) { echo '...'; } ?></span><span style="float:right;"><?= date('Y-m-d',$val->updated_at);?></span></a></li>
                    <?php } } ?>
                    </ul>
        <div class="newpage mt50 mb50">
            <?php if($pages)
                {
                    echo LinkPager::widget([
                    'maxButtonCount' => 6,
                    'prevPageLabel' =>'&lt;',
                    'nextPageLabel' =>'&gt;',
                    'pagination'=>$pages,
                ]);
                }
            ?>
        </div>
        </div>
        <div style="clear:both"></div>
</div>
        